package edu.sju.ssm.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import edu.sju.ssm.entity.Publisher;

@Mapper
public interface PublisherMapper {
	@Select("select id, name, year_created as yearCreated, intro from publishers")
	List<Publisher> selectAllPublishers();
	@Select("select count(*) from publishers")
	int selectPublisherCount();
	@Insert("insert into publishers (name, year_created, intro) values(#{name}, #{yearCreated}, #{intro})")
	void insertPublisher(Publisher publisher);
}
